package com.yty.demo._4_oop;

/**
 * @author: yangtaoyao
 * @time: 2020/1/6$ 14:02$
 * @description:
 */
public class Dog {
    /**
     * 基本数据类型：
     * byte short in long char  boolean  float  double
     * 8bit  16   32  64   16    1       32     64
     */
    private byte aByte=1;
    private short aShort=2;
    private int anInt=3;
    private long aLong=10;
    private float aFloat=0.1f;//必须声明f
    private double aDouble=0.1;
    private char aChar=' ';
    private boolean aBoolean=true;
    private String string;
    private Object[] objects;

    public static void main(String[] args) {
        Dog dog=new Dog(2, (short) 2);
        System.out.println(dog.aByte);
        System.out.println(dog.aShort);
        System.out.println(dog.anInt);
        System.out.println(dog.aLong);
        System.out.println(dog.aFloat);
        System.out.println(dog.aDouble);
        System.out.println(dog.aChar);
        System.out.println(dog.aBoolean);
        System.out.println(dog.string);//null
    }

    /**
     * 构造方法
     * 初始化对象
     */
    public Dog(int b,short aShort){
        this.anInt=b;
        this.aShort=aShort;
    }




}
